import { isConstructorDeclaration } from 'typescript';

export class Parent {
  name: string;
  constructor(name: string) {
    this.name = name;
  }

  run() {
    console.log('parent run!');
  }
}

class Son extends Parent {
  age: number;
  constructor(name: string, age: number) {
    super(name);
    this.age = age;
  }

  run() {
    super.run();
    console.log('son run!');
  }
}

const son = new Son('a', 21);
son.run();

abstract class Parent1 {
  name!: string;

  isConstructorDeclaration() {}

  abstract eat(): void;
}
